package action

import (
	"core/coreentity"
	"core/coreqto"
	"core/corestruct"
	"core/coreutil"
	"ht/api/htcls/service"

	"ht/htinfo"
	"reflect"
)

type PageAction struct {
}

func (p *PageAction) Do(mm *coreqto.BasePageDtQto, ctx *corestruct.HttpContext) (*corestruct.Page[coreentity.HtCls], error) {
	return service.MainService.Page(mm, ctx)
}

func PageActionInit() {

	var mact = &PageAction{}
	var maction = corestruct.Action{
		Method: "get",

		FullUrl: URLPrev + "/Page",
		Name:    PAGEName + "分页",
		Ename:   "",
		Memo:    "",

		PinType:    "",
		PinIslist:  false,
		PoutType:   "",
		PoutIslist: false,
		PoutIspage: false,

		AuthType: corestruct.AuthType_Login,

		LogNeed:     false,
		LogPin:      false,
		LogPout:     false,
		LogTemplete: "",

		PrjName: htinfo.PRJ_NAME,

		Value: reflect.ValueOf(mact),
	}
	coreutil.ActionUtil.Add(maction)

}
